package org.agile4j.patterns.command.calculator;

public class SubstractCommand implements Command {

	private OperationApi operation = null ;
	private int operNum ;
	
	public SubstractCommand(OperationApi operation, int operNum){
		this.operation = operation ;
		this.operNum = operNum ;
	}
	@Override
	public void execute() {
		this.operation.substract(operNum);
	}

	@Override
	public void undo() {
		this.operation.add(operNum);
	}

}
